<template>
    <div class="inlineBlock">
      <template v-if="values.length">
          <template v-for="(item, index) in options">
            <template v-if="values.includes(item.corpCode)">
                <span
                :index="index"
                >{{ item.corpName + ' ' }}
                </span>
            </template>
          </template>
      </template>
      <template v-else>
        <span>-</span>
      </template>
    </div>
  </template>
  
  <script>

  export default {
    name: "DictTag",
    props: {
      options: {
        type: Array,
        default: null,
      },
      value: [Number, String, Array],
      // 当未找到匹配的数据时，显示value
      showValue: {
        type: Boolean,
        default: true,
      }
    },
    data() {
      return {
      }
    },
    computed: {
      values() {
        if (this.value !== null && typeof this.value !== 'undefined') {
          return Array.isArray(this.value) ? this.value : [String(this.value)];
        } else {
          return [];
        }
      },
    },
  };
  </script>
  <style scoped>
  </style>
  